<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script type="text/javascript" charset="UTF-8" src="../../../../js/class/vue.min.js"></script>
	</head>
	<body>
		<div id="vue-app">
			<div>{{title}}</div>
		</div>
		<script type="text/javascript">
			setTimeout(function(){
				str = "电子账户";
				vm.msg = str;
			},1);
			
			var str = "标题";
			var vm = new Vue({
				el: "#vue-app",
				data: {
					msg: str,
					title: "标题",
				},
				watch:{
					msg(val){//在IE浏览器中此写法不被识别,应写为下一行
					//msg:function(){
						alert(val);
						this.title = this.msg;
					},
				}
			});
			
			
		</script>
	</body>
</html>